install mysql:
  cmd.run:
    - name: |
        yum -y install mysql-server mysql mysql-deve
        service mysqld start
        mysqladmin -u root password '123456'

#登录： mysql -u root -p

# wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
# rpm -ivh mysql57-community-release-el7-8.noarch.rpm
# yum install mysql-community-server

#/etc/my.cnf
#[mysql]
#default-character-set =utf8

#新建用户
#create user 'vagrant'@'%' identified by 'vagrant';  
#把在所有数据库的所有表的所有权限赋值给位于所有IP地址的root用户。
#grant all privileges on *.* to root@'%'identified by 'password';